package com.likui.myqq.activity;

import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentTransaction;
import android.view.View;

import com.likui.myqq.R;
import com.likui.myqq.fragment.QQContactFragment;
import com.likui.myqq.view.TitleBarView;

/**
 * Created by helikui on 2015/10/3.
 */
public class QQContactActivity extends FragmentActivity {
    private Context mContext;
    private TitleBarView mTitleBarView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mContext = this;
        setContentView(R.layout.activity_qq_contact);
        findView();
        init();
    }

    private void findView() {
        mTitleBarView = (TitleBarView) findViewById(R.id.title_bar);
    }

    private void init() {
        mTitleBarView.setCommonTitle(View.GONE, View.VISIBLE, View.GONE, View.GONE);
        mTitleBarView.setTitleText(R.string.choose_contact);

        FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
        QQContactFragment qqContactFragment = new QQContactFragment();
        ft.replace(R.id.rl_contact, qqContactFragment);
        ft.commit();
    }
}
